package com.ruoyi.common.entity.CoreEntity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 库存交易记录对象 stock_transaction_record
 * 
 * @author yfk
 * @date 2025-08-07
 */
public class StockTransactionRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 关联商户信息表id（逻辑外键，关联store_info.id） */
    @Excel(name = "关联商户信息表id", readConverterExp = "逻=辑外键，关联store_info.id")
    private Long storeInfoId;

    /** 商品SKU ID（逻辑外键，关联sku.id） */
    @Excel(name = "商品SKU ID", readConverterExp = "逻=辑外键，关联sku.id")
    private Long skuId;

    /** 交易类型（1采购入库，2销售出库，3退货入库，4调拨出库，5调拨入库） */
    @Excel(name = "交易类型", readConverterExp = "1=采购入库，2销售出库，3退货入库，4调拨出库，5调拨入库")
    private Long transactionType;

    /** 业务来源类型（1采购，2订单，3退货，4调拨等） */
    @Excel(name = "业务来源类型", readConverterExp = "1=采购，2订单，3退货，4调拨等")
    private Long sourceType;

    /** 业务单号，如订单号、采购单号、调拨单号 */
    @Excel(name = "业务单号，如订单号、采购单号、调拨单号")
    private String relatedOrderNo;

    /** 交易数量 */
    @Excel(name = "交易数量")
    private Long quantity;

    /** 操作人ID（管理员或系统） */
    @Excel(name = "操作人ID", readConverterExp = "管=理员或系统")
    private Long operatorId;

    /** 逻辑删除标志（0-未删除，1-已删除） */
    @Excel(name = "逻辑删除标志", readConverterExp = "0=-未删除，1-已删除")
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStoreInfoId(Long storeInfoId) 
    {
        this.storeInfoId = storeInfoId;
    }

    public Long getStoreInfoId() 
    {
        return storeInfoId;
    }

    public void setSkuId(Long skuId) 
    {
        this.skuId = skuId;
    }

    public Long getSkuId() 
    {
        return skuId;
    }

    public void setTransactionType(Long transactionType) 
    {
        this.transactionType = transactionType;
    }

    public Long getTransactionType() 
    {
        return transactionType;
    }

    public void setSourceType(Long sourceType) 
    {
        this.sourceType = sourceType;
    }

    public Long getSourceType() 
    {
        return sourceType;
    }

    public void setRelatedOrderNo(String relatedOrderNo) 
    {
        this.relatedOrderNo = relatedOrderNo;
    }

    public String getRelatedOrderNo() 
    {
        return relatedOrderNo;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setOperatorId(Long operatorId) 
    {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() 
    {
        return operatorId;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeInfoId", getStoreInfoId())
            .append("skuId", getSkuId())
            .append("transactionType", getTransactionType())
            .append("sourceType", getSourceType())
            .append("relatedOrderNo", getRelatedOrderNo())
            .append("quantity", getQuantity())
            .append("operatorId", getOperatorId())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .toString();
    }
}
